<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 高金磊
  Date: 2021/3/30
  Time: 13:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>登录</title>
  <link rel="stylesheet" href="<%=basePath%>css/normalize.css">
  <link rel="stylesheet" href="<%=basePath%>css/login.css">
  <link rel="stylesheet" href="<%=basePath%>css/sign-up-login.css">
  <link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="<%=basePath%>css/inputEffect.css" />
  <link rel="stylesheet" href="<%=basePath%>css/tooltips.css" />
  <link rel="stylesheet" href="<%=basePath%>css/spop.min.css" />

  <script src="<%=basePath%>js/jquery.min.js"></script>
  <script src="<%=basePath%>js/snow.js"></script>
  <script src="<%=basePath%>js/jquery.pure.tooltips.js"></script>
  <script src="<%=basePath%>js/spop.min.js"></script>
  <style type="text/css">
    html{width: 100%; height: 100%;}

    body{

      background-repeat: no-repeat;

      background-position: center center #2D0F0F;

      background-color: #00BDDC;

      background-image: url(<%=basePath%>images/snow.jpg);

      background-size: 100% 100%;

    }

    .snow-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100001; }

  </style>
</head>
<body>
<!-- 雪花背景 -->
<div class="snow-container"></div>
<!-- 登录控件 -->
<div id="login">
  <input id="tab-1" type="radio" name="tab" class="sign-in hidden" checked />
  <input id="tab-2" type="radio" name="tab" class="sign-up hidden" />
  <input id="tab-3" type="radio" name="tab" class="sign-out hidden" />
  <div class="wrapper">
    <!-- 登录页面 -->
    <div class="login sign-in-htm">
      <form class="container offset1 loginform" action="Login.action" method="get">
        <!-- 猫头鹰控件 -->
        <div id="owl-login" class="login-owl">
          <div class="hand"></div>
          <div class="hand hand-r"></div>
          <div class="arms">
            <div class="arm"></div>
            <div class="arm arm-r"></div>
          </div>
        </div>
        <div class="pad input-container">
            <h3>XXX图书借阅系统</h3>
          <section class="content">
							<span class="input input--hideo">
								<input class="input__field input__field--hideo" type="text" id="login-username"
                                       autocomplete="off" placeholder="请输入用户名" tabindex="1" maxlength="15" name="username"  value="<%=request.getParameter("username")==null?"":request.getParameter("username")%>" />
								<label class="input__label input__label--hideo" for="login-username">
									<i class="fa fa-fw fa-user icon icon--hideo"></i>
									<span class="input__label-content input__label-content--hideo"></span>
								</label>
							</span>
            <span class="input input--hideo">
								<input class="input__field input__field--hideo" type="password" id="login-password" placeholder="请输入密码" tabindex="6" maxlength="15" name="password"  value="<%=request.getParameter("password")==null?"":request.getParameter("password")%>"/>
								<label class="input__label input__label--hideo" for="login-password">
									<i class="fa fa-fw fa-lock icon icon--hideo"></i>
									<span class="input__label-content input__label-content--hideo"></span>
								</label>
							</span>
          </section>
        </div>
          <div>
              <small style="color:red;"><s:actionerror/></small>
          </div>
        <div class="form-actions">
          <a tabindex="4" class="btn pull-left btn-link text-muted" onClick="window.confirm('请联系管理员')">忘记密码?</a>
          <a tabindex="5" class="btn btn-link text-muted" onClick="window.confirm('请前往图书管,联系管理员分配账户')">注册</a>
          <input class="btn btn-primary" type="submit" tabindex="3"  value="登录"
                 style="color:white;"/>
        </div>
      </form>
    </div>
  </div>
</div>
<%--<div class="loginpage">--%>
<%--<div class="login">--%>
<%--<div class="login-center">--%>
<%--<div class="login-header text-center">--%>
<%--图书借阅系统--%>
<%--&lt;%&ndash;<a href=""> <img src="<%=basePath%>images/admin_logo.png"> </a>&ndash;%&gt;--%>
<%--</div>--%>
<%--<s:form action="Login" method="get">--%>
<%--<div class="form-group has-feedback feedback-left">--%>
<%--<input type="text" placeholder="请输入您的用户名" class="form-control" name="username"  value="<%=request.getParameter("username")==null?"":request.getParameter("username")%>"  id="username" />--%>
<%--<span class="ftsucai-65 form-control-feedback" aria-hidden="true"></span>--%>
<%--</div>--%>
<%--<div class="form-group has-feedback feedback-left">--%>
<%--<input type="password" placeholder="请输入密码" class="form-control" id="password" name="password"  value="<%=request.getParameter("password")==null?"":request.getParameter("password")%>"  />--%>
<%--<span class="ftsucai-216 form-control-feedback" aria-hidden="true"></span>--%>
<%--</div>--%>
<%--<s:actionerror/>--%>
<%--<div class="form-group">--%>
<%--<button class="btn btn-block btn-primary" type="submit">立即登录</button>--%>
<%--</div>--%>
<%--</s:form>--%>
<%--<hr>--%>
<%--</div>--%>
<%--</div>--%>
<%--</div>--%>

</body>
<script>
    (function() {
        // trim polyfill : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
        if (!String.prototype.trim) {
            (function() {
                // Make sure we trim BOM and NBSP
                var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
                String.prototype.trim = function() {
                    return this.replace(rtrim, '');
                };
            })();
        }
    })();

    $(function() {
        $('#login #login-password').focus(function() {
            $('.login-owl').addClass('password');
        }).blur(function() {
            $('.login-owl').removeClass('password');
        });
        $('#login #register-password').focus(function() {
            $('.register-owl').addClass('password');
        }).blur(function() {
            $('.register-owl').removeClass('password');
        });
        $('#login #register-repassword').focus(function() {
            $('.register-owl').addClass('password');
        }).blur(function() {
            $('.register-owl').removeClass('password');
        });
        $('#login #forget-password').focus(function() {
            $('.forget-owl').addClass('password');
        }).blur(function() {
            $('.forget-owl').removeClass('password');
        });
    });

</script>
</html>
